package net.lesscoding.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName trade_mq_consumer_log
 */
@TableName(value ="trade_mq_consumer_log")
@Data
public class MqConsumerLog implements Serializable {
    /**
     * 
     */
    private String groupName;

    /**
     * 
     */
    private String msgTag;

    /**
     * 
     */
    private String msgKey;

    /**
     * 
     */
    private String msgId;

    /**
     * 
     */
    private String msgBody;

    /**
     * 0:正在处理;1:处理成功;2:处理失败
     */
    private Integer consumerStatus;

    /**
     * 
     */
    private Integer consumerTimes;

    /**
     * 
     */
    private Date consumerTimestamp;

    /**
     * 
     */
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MqConsumerLog other = (MqConsumerLog) that;
        return (this.getGroupName() == null ? other.getGroupName() == null : this.getGroupName().equals(other.getGroupName()))
            && (this.getMsgTag() == null ? other.getMsgTag() == null : this.getMsgTag().equals(other.getMsgTag()))
            && (this.getMsgKey() == null ? other.getMsgKey() == null : this.getMsgKey().equals(other.getMsgKey()))
            && (this.getMsgId() == null ? other.getMsgId() == null : this.getMsgId().equals(other.getMsgId()))
            && (this.getMsgBody() == null ? other.getMsgBody() == null : this.getMsgBody().equals(other.getMsgBody()))
            && (this.getConsumerStatus() == null ? other.getConsumerStatus() == null : this.getConsumerStatus().equals(other.getConsumerStatus()))
            && (this.getConsumerTimes() == null ? other.getConsumerTimes() == null : this.getConsumerTimes().equals(other.getConsumerTimes()))
            && (this.getConsumerTimestamp() == null ? other.getConsumerTimestamp() == null : this.getConsumerTimestamp().equals(other.getConsumerTimestamp()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGroupName() == null) ? 0 : getGroupName().hashCode());
        result = prime * result + ((getMsgTag() == null) ? 0 : getMsgTag().hashCode());
        result = prime * result + ((getMsgKey() == null) ? 0 : getMsgKey().hashCode());
        result = prime * result + ((getMsgId() == null) ? 0 : getMsgId().hashCode());
        result = prime * result + ((getMsgBody() == null) ? 0 : getMsgBody().hashCode());
        result = prime * result + ((getConsumerStatus() == null) ? 0 : getConsumerStatus().hashCode());
        result = prime * result + ((getConsumerTimes() == null) ? 0 : getConsumerTimes().hashCode());
        result = prime * result + ((getConsumerTimestamp() == null) ? 0 : getConsumerTimestamp().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", groupName=").append(groupName);
        sb.append(", msgTag=").append(msgTag);
        sb.append(", msgKey=").append(msgKey);
        sb.append(", msgId=").append(msgId);
        sb.append(", msgBody=").append(msgBody);
        sb.append(", consumerStatus=").append(consumerStatus);
        sb.append(", consumerTimes=").append(consumerTimes);
        sb.append(", consumerTimestamp=").append(consumerTimestamp);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}